package com.cms.common.model.services;

import com.cms.common.model.entity.AdminUser;
import com.cms.common.model.entity.AdminUserRememberLogin;
import com.cms.common.model.entity.Roles;
import com.cms.common.model.vo.RequestData;
import org.springframework.data.domain.Page;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface AdminUserService {
    public AdminUser getAdminUserByUsername(String username);

    public AdminUser getAdminUserByUuid(String uuid);

    public AdminUser getAdminUserById(Long id);

    public String encodePwd(String username, String pwd, String salt);

    public String token(String key);

    public AdminUser insertAdminUser(AdminUser adminUser);

    public String loginToken(String adminUserUuid, String cookieToken);

    public boolean logout(String adminUserUuid,HttpServletRequest request, HttpServletResponse response);

    public AdminUserRememberLogin getTokenByCookieToken(String token);

    public boolean checkLogin(HttpServletRequest request, HttpServletResponse response);

    public List<AdminUser> findByRoles(Roles roles);

    public Page<AdminUser> getAdminUserByPage(RequestData requestData);


    public void deleteUsers(AdminUser adminUser);
}
